﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using SpriteObjects;

namespace GameEntity
{
    public class Item : AbstractVisible
    {
        private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public Item(Texture2D[] textures, Vector2 pos, string name)
        {
            Sprites = new My2DSprite[1];
            Sprites[0] = new My2DSprite(textures, pos);
            NSprite = 1;
            _name = name;
        }

        public void Update(GameTime gameTime)
        {
            Sprites[0].UpdateNextTexture(gameTime);
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            Sprites[0].Draw(gameTime, spriteBatch);
        }

        public bool IsClicked(Vector2 vector)
        {
            return Sprites[0].IsClicked(vector);
        }
    }
}
